module.exports = {
  productionSourceMap: false,
  chainWebpack: (config) => {
    config.plugin('html').tap((args) => {
      args[0].title = 'nbiot-设备管理平台';
      return args;
    });
  },
  css: {
    loaderOptions: {
      sass: {
        prependData: `@import "~@/styles/variables.scss";`,
      },
    },
  },
  configureWebpack: {
    plugins: [],
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'https://124.222.253.211:1416/',
        ws: true,
        changeOrigin: false,
        pathRewrite: {
          '^/api': '/api'
        },
      },
      '/upload': {
        target: 'https://124.222.253.211:1416/',
        ws: true,
        changeOrigin: false,
        pathRewrite: {
          '^/upload': '/upload'
        },
      },
    },
  },
};
